﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpage/CommonPage.master" AutoEventWireup="true" CodeFile="AddLevel.aspx.cs" Inherits="Vip_AddLevel" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="pagenav"><b>您现在的位置：</b>我的管理平台 > <strong><a href="LevelManagement.aspx">VIP等级管理</a></strong> > 等级信息录入</div>
<div style="overflow:auto;">
    <!--paneltitle-->
    <div class="paneltitle">等级信息</div>
    <!--paneladd-->
    <div class="paneladd">
         <input type="button" class="btn" value="返回" onclick="javascript:window.location.href = 'LevelManagement.aspx';this.blur();return false;" />
    </div>
</div>
<div ID="dv_AddLevel" runat="server" class="dataform">
	<table cellspacing="1">
	    <tr>
        	<td colspan="2" style="vertical-align:middle; font-weight:bold; padding-left:10px;" class="base">登录资料：（<font color="red">*</font>表示必填项）</td>
        </tr>
	    <tr>
        	<th width="20%"><div><font color="red">*</font>等级名称：</div></th>
            <td class="editortd" width="80%">
    	        <asp:TextBox ID="txtTitle" runat="server" CssClass="txtBox" MaxLength="50" Width="150px" />
    	        <span id="valTitle" style="display:none;" class="note2"><img src="<%=ResolveThemeImagePath("iconinfo.gif")%>" align="absmiddle" /></span><span class="note2 msgError"></span>
            </td>
        </tr>  
        <tr>
        	<th><div><font color="red">*</font>达标积分：</div></th>
            <td>
    	        <asp:TextBox ID="txtScore"  runat="server" CssClass="txtBox" MaxLength="50" Width="50px" />
    	        <span style="color:#999999">必须填写数字</span>
    	        <span id="valScore" style="display:none;" class="note2"><img src="<%=ResolveThemeImagePath("iconinfo.gif")%>" align="absmiddle" /></span><span class="note2 msgError"></span>
            </td>
        </tr>
	    
        <tr class="editortr">
        	<th class="editorth"><div></div></th>
            <td class="editortd">
                <input  type="button" name="btn_Add" class="btn" value=" 添 加 " onclick="javascript:check();"  />
                <asp:LinkButton ID="btn_Add" runat="server" CssClass="btn" OnClick="btn_Add_Click" style="display:none"/>
            </td>
        </tr>
	</table>
</div>
<script type="text/javascript">
    function check() {
        var _lvlTitle, _lvlScore
        var _errorCount = 0;
        _lvlTitle = jQuery.trim(jQuery("#<%= txtTitle.ClientID %>").val());
        _lvlScore = jQuery.trim(jQuery("#<%= txtScore.ClientID %>").val());

        jQuery(".msgError").empty();
        jQuery(".note2").hide();

        if (_lvlTitle == "") {
            _errorCount += 1;
            jQuery("#valTitle").show().next().show().html("必须填写等级名称");
        }

        if (_lvlScore == "") {
            _errorCount += 1;
            jQuery("#valScore").show().next().show().html("必须填写达标积分");
        } else {

            var reg = /^\+?[0-9][0-9]*$/; //判断是否为正整数正则
            if (!reg.test(_lvlScore)) {
                _errorCount += 1;
                jQuery("#valScore").show().next().show().html("必须填写一个整数");
            }
        }

        if (_errorCount == 0) {
            __doPostBack('ctl00$ContentPlaceHolder1$btn_Add', '');
        }
    }
</script>
</asp:Content>

